package com.fm.openinstall.a;

import android.os.*;
import android.content.*;

class c implements Runnable
{
    final /* synthetic */ b a;

    c(final b a) {
        this.a = a;
    }

    @Override
    public void run() {
        final ClipData primaryClip = this.a.c.getPrimaryClip();
        if (primaryClip != null && primaryClip.getItemCount() > 0) {
            final ClipData.Item item = primaryClip.getItemAt(0);
            if (item != null) {
                String htmlText;
                if (Build.VERSION.SDK_INT >= 16) {
                    htmlText = item.getHtmlText();
                }
                else {
                    htmlText = null;
                }
                String string;
                if (item.getText() == null) {
                    string = null;
                }
                else {
                    string = item.getText().toString();
                }
                if (this.a.a(htmlText, string).c() != 0) {
                    ClipboardManager clipboardManager;
                    ClipData primaryClip2;
                    if (Build.VERSION.SDK_INT >= 16) {
                        clipboardManager = this.a.c;
                        primaryClip2 = ClipData.newHtmlText((CharSequence)null, (CharSequence)null, (String)null);
                    }
                    else {
                        clipboardManager = this.a.c;
                        primaryClip2 = ClipData.newPlainText((CharSequence)null, (CharSequence)null);
                    }
                    clipboardManager.setPrimaryClip(primaryClip2);
                }
            }
        }
    }
}
